<div class="row">
    <div class="col-xs-6 pull-left">
        <!--<a class="btn btn-info" title="Add" ng-click="user.open()"><i class="glyphicon glyphicon-plus"/></a>-->
        <a class="btn btn-info" title="Add" ui-sref="user.add"><i class="glyphicon glyphicon-plus"/></a>
        <a class="btn btn-danger" title="Remove" ng-click="user.removeUsers()"><i class="glyphicon glyphicon-remove"/></a>
    </div>
    <div class="col-xs-6 pull-right">
        <input type="text" name="search" placeholder="Search">
    </div>
</div>
<div class="row">
    <div class="table-responsive">
        <table class="table table-striped table-hover table-bordered">
            <tr>
                <th><input type="checkbox" ng-click="user.selectAll()"></th>
                <th style="width: 10%;">ID</th>
                <th style="width: 20%;">User</th>
                <th style="width: 20%;">Tel</th>
                <th style="width: 20%;">Email</th>
                <th style="width: 20%">Roles</th>
                <th style="width: 10%;">Operate</th>
            </tr>
            <tr ng-repeat="user1 in user.users">
                <td><input type="checkbox" name="userId" value="{{user1.id}}" ng-checked="user1.isSelected" ng-click="user.setSelected(user1.id)"></td>
                <td>{{user1.id}}</td>
                <td>{{user1.username}}</td>
                <td>{{user1.tel}}</td>
                <td>{{user1.mail}}</td>
                <td></td>
                <td>
                    <a class="btn btn-info" title="Update" ng-click="user.modify(user1.id)"><i class="glyphicon glyphicon-refresh"/></a>
                    <a class="btn btn-danger" title="Remove" ng-click="user.remove(user1.id)"><i class="glyphicon glyphicon-remove"/></a>
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="row">
    <div class="col-xs-12 text-right">
        <pages total-items="{{user.totalNum}}" big-current-page="user.currentPageNo" max-size="{{user.maxSize}}" item-per-page="{{user.itemPerPage}}" templateUrl="./pages.html"></pages>
    </div>
</div>

<div class="row">
    <div ui-view></div>
</div>
<div class="mode-demo">
    <script type="text/ng-template" id="myModalContent.html">
        <div class="modal-header">
            <h3 class="modal-title text-center" id="modal-title">Add a user</h3>
        </div>

        <div class="modal-footer">
            <button class="btn btn-primary" type="button" ng-click="save()">Save</button>
            <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
        </div>
    </script>

    <alert is-show="user.isShow" message="user.message"></alert>
</div>
